<?php

/**
 * Config Loader / Parser
 *
 */


class Config
{
	public static $configDir = "config/";
	public static $configVars = array();
	
	public static function get($config,$var)
	{
		self::load($config);
		return self::$configVars[$config][$var];
	}
	
	public static function getAll($config)
	{
		self::load($config);
		return self::$configVars[$config];
	}
	
	public static function load($config)
	{
		if(!isset(self::$configVars[$config]))
		self::$configVars[$config] = Spyc::YAMLLoad(PLEX::$BASE_DIR . self::$configDir . $config . ".yml");
	}
}